home *** CD-ROM | disk | FTP | other *** search
- import vrml.Event;
- import vrml.field.SFInt32;
- import vrml.node.Script;
- import vs.Vscp;
-
- public class init extends Script {
- SFInt32 choice;
-
- public void initialize() {
- this.choice = (SFInt32)((Script)this).getEventOut("choice");
- }
-
- public void processEvent(Event var1) {
- String var2 = Vscp.getAvtroomAvatarURL();
- if (var1.getName().equals("init")) {
- if (var2.endsWith("boy.wrl")) {
- this.choice.setValue(0);
- } else if (var2.endsWith("girl.wrl")) {
- this.choice.setValue(1);
- } else {
- this.choice.setValue(0);
- }
- }
- }
- }
-